<%layout("../common/_layout.html", {nav: "会员单位管理"}) {%>
<div class="result-title">
  <div class="result-list">
    <a href="/admin/org/add">添加会员单位</a>
  </div>
  <form action="/admin/org/index" method="post">
  <table class="search-tab">
    <tr>
      <th>会员单位类型</th>
      <td>
        <select name="type" id="type">
          <%for(option in @orgTypeCache.getOptionListAll()) {%>
            <%if(has(type) && type == option.value) {%>
              <option value="${option.value}" selected>${option.name}</option>
            <%} else {%>
              <option value="${option.value}">${option.name}</option>
            <%}%>
          <%}%>
        </select>
      </td>
      <th>会员单位名称</th>
      <td><input type="text" class="common-text" size="30" name="orgName" value="${orgName!}"></td>
      <td><input type="submit" class="btn btn-primary btn6 mr10" value="查询"></td>
    </tr>
  </table>
  </form>
</div>
<div class="result-content">
  <table class="result-tab"  width="100%">
    <tr>
      <th width="5%">No.</th>
      <th>单位名称</th>
      <th>单位类别</th>
      <th>操作</th>
    </tr>
    <%for(org in orgPage.list) {%>
    <tr>
      <td>${orgLP.index}</td>
      <td>${org.name}</td>
      <td>${@orgTypeCache.getNameByValue(org.type)}</td>
      <td>
        <a class="link-update" href="/admin/org/view?id=${org.id }">查看</a>&nbsp;
        <a class="link-update" href="/admin/org/edit?id=${org.id }">修改</a>&nbsp;
        <a class="link-del" href="/admin/org/delete?id=${org.id }" onclick="return confirm('删除后无法恢复,确定要删除吗')">删除</a>&nbsp;
      </td>
    </tr>
    <%}%>
  </table>
  <%include("../common/_paginate.html", {"currentPage": orgPage.pageNumber, "totalPage": orgPage.totalPage, "totalRow": orgPage.totalRow, "actionUrl": "/admin/org/", "urlParas": "${urlParas}"}){}%>
</div>
<%}%>